<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">
    var num1=123;
    var num2=456;

    var a=num1;
    num1=num2;
    num2=a;
    console.log(num1)
    console.log(num2)

 </script>
</body>
</html>